<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        #outer{
            width: 1000px;
            height: 750px;
            border: 1px solid #999;
        }

        #header{
            border: 1px solid red;
            height: 150px;

            /* width:1000-2 = 998px */
            width: 998px;
        }

        #middle{
            border: 1px solid green;
            height: 500px;
            width:998px;

            margin-top:2px;

            margin-bottom: 2px;
        }

        #middle_left{
            border:1px solid #000;
            width: 300px;
            /* 500-2 */
            height: 498px;

            float: left;

            margin-right: 2px;
        }

        #middle_right{
            border: 1px solid gold;
            /* 998 - 2 - 300 - 2 - 2 */
            width: 692px;
            height: 498px;

            float: left;
        }

        #footer{
            border:1px solid purple;
            width: 998px;

            /* 750px - 150px - 2px - 2px[margin] - 500 - 2px - 2px[margin] - 2px */
            height: 90px;
        }
    </style>
</head>
<body>
    <!--确定最外层的div-->
    <div id="outer">
        <!--头部-->
        <div id="header"></div>
        <!-- 中部 -->
        <div id="middle">
            <div id="middle_left"></div>
            <div id="middle_right"></div>
        </div>
        <!-- 尾部 -->
        <div id="footer"></div>
    </div>
</body>
</html>